Technical Q&A QA1297
Don't forget to cancel your Rendezvous resolve


Q: After I Resolve a Rendezvous service in order to get its IP addresses, do I need to cancel the Resolve operation?

A: Yes. Leaving the Resolve operation running places an unnecessary burden on the network because you end up sending query packets every couple of minutes in order to keep the DNS resource records up-to-date in the local machine's Rendezvous cache. You should only Resolve the service at the moment you need to connect to it, and you should cancel the Resolve immediately after successfully connecting to the service. Starting in Mac OS X 10.3, failure to cancel the Resolve will cause the following message to appear in the system log (/var/log/system.log).



Listing 1. system.log message


Oct 11 12:57:54 admin mDNSResponder[266]: 37755: DNSServiceResolver

(Ice Cube._http._tcp.local.) has remained active for over two minutes.

This places considerable burden on the network.




There are some rare applications that need to keep a Resolve running in order to monitor for TXT record changes. iChat, for example, continuously monitors for changes to a buddy's status message, which is stored in the Rendezvous TXT record. If your application requires this type of functionality, you should avoid using the standard Resolve methods from CFNetServices or NSNetServices. Instead you should use the new DNSServiceDiscovery APIs introduced in Mac OS X 10.3, located at /usr/include/dns_sd.h. The function DNSServiceQueryRecord will allow you to restrict your query to only TXT records, which is more efficient than using the regular Resolve operations which send a query for SRV, TXT and address records.


[Oct 15, 2003]


Developer Documentation | Technical Notes | Development Kits | Sample Code